<div class="block_filter_product_realestate">
    <div class="box_basic background_white mts border_t_n">
        <div class="box_filter_product_realestate">
            <form action="<?php print BASE_URL . 'tim-kiem-nha-dat';?>" id="form_filter_product" class="form_filter_product pvn phm" method="get">               
                <div class="col_left left w900 list_row_filter_product">    
                    <div class="group_filer_product">
                        <div class="col_filter_product">							
                            <select id="filter_product_slb_type_post" class="tbSelectInput filter_product_slb_type_post filter_product_input" onChange="change_type_post(this.value , 'filter_product_slb_type_real' , 'filter_product_slb_price');" name="slb_type_post">
                                <option value="2" <?php if($s['slb_type_post'] == 2) print 'selected="selected"';?> >Nhà đất bán</option>
                                <option value="1" <?php if($s['slb_type_post'] == 1) print 'selected="selected"';?>>Nhà đất cho thuê</option>                                    
                            </select>
                        </div>
                        <div class="col_filter_product">
							<?php
								$list_type_real = $s['slb_type_post'] > 0 ? mdGetListTypeRealByTypePost( $s['slb_type_post'] ) : NULL;				
							?>
                            <select id="filter_product_slb_type_real" class="tbSelectInput filter_product_slb_type_real filter_product_input" name="slb_type_real">
                                <option value='0'>Chọn loại nhà đất</option>
                                <?php foreach($list_type_real as $type_real): ?>
                                <option value="<?php print $type_real->id;?>" <?php if($s['slb_type_real'] == $type_real->id) print 'selected="selected"';?>><?php print $type_real->name;?></option>
                                <?php endforeach; ?>
                            </select>
                        </div>
                        <div class="col_filter_product">
                            <?php   $list_city = mdGetCity(); ?>
                            <select id="filter_product_slb_city" class="tbSelectInput filter_product_slb_city filter_product_input" onChange="change_city(this.value , 'filter_product_slb_district' , 'filter_product_slb_ward' , 'filter_product_slb_street' , 'filter_product_slb_project');" name="slb_city">
                                <option value="0">Tỉnh/Thành phố</option>
                                <?php foreach($list_city as $city): ?>
                                <option value="<?php print $city->id;?>" <?php if($s['slb_city'] == $city->id) print 'selected="selected"';?> ><?php print $city->name;?></option>
                                <?php endforeach; ?>
                            </select>
                        </div>
                        <div class="col_filter_product">
							<?php   $list_district = mdGetListDistrictByCity( $s['slb_city'] ); ?>							
                            <select id="filter_product_slb_district" class="tbSelectInput filter_product_slb_district filter_product_input" onChange="change_district(this.value  , 'filter_product_slb_ward' , 'filter_product_slb_street' , 'filter_product_slb_project');" name="slb_district">
                                <option value="0">Quận/Huyện</option>
                                <?php foreach($list_district as $ditrict): ?>
                                <option value="<?php print $ditrict->id;?>" <?php if($s['slb_district'] == $ditrict->id) print 'selected="selected"';?> ><?php print $ditrict->name;?></option>
                                <?php endforeach; ?>
                            </select>
                        </div>     
                         <div class="col_filter_product last">
							<?php  $list_price = mdGetListPriceByTypePost( $s['slb_type_post'] ); ?>				
                            <select id="filter_product_slb_price" class="tbSelectInput filter_product_slb_price filter_product_input" name="slb_price">
                                <option value="-1">Khoảng giá</option>
                                <?php foreach($list_price as $price): ?>
                                <option value="<?php print $price['value'];?>" <?php if($s['slb_price'] == $price['value']) print 'selected="selected"';?> ><?php print $price['name'];?></option>
                                <?php endforeach; ?>
                            </select>
                        </div>                        
                        <div class="clf"></div>
                    </div>
                    <div class="group_filer_product_extension">
                        <div class="group_filer_product">   
							<?php  $list_area = aSearchArea(); ?>								
                           <div class="col_filter_product">
                                <select id="filter_product_slb_area" class="tbSelectInput filter_product_slb_area filter_product_input" name="slb_area">
									<option value="-1">Diện tích</option>
									<?php foreach($list_area as $area): ?>
									<option value="<?php print $area['value'];?>" <?php if($s['slb_area'] == $area['value']) print 'selected="selected"';?> ><?php print $area['name'];?></option>
									<?php endforeach; ?>                                   
                                </select>
                           </div>   
                           <div class="col_filter_product">							   
							   <?php  $list_ward = mdGetListWardByDistrict( $s['slb_district'] ); ?>		
                                <select id="filter_product_slb_ward" class="tbSelectInput filter_product_slb_ward filter_product_input" name="slb_ward">
                                    <option value="-1">Phường/Xã</option>
                                    <?php foreach($list_ward as $ward): ?>
									<option value="<?php print $ward->id;?>" <?php if($s['slb_ward'] == $ward->id) print 'selected="selected"';?> ><?php print $ward->name;?></option>
									<?php endforeach; ?>     
                                </select>
                            </div>
                            <div class="col_filter_product">
								<?php  $list_street = mdGetListStreetByDistrict( $s['slb_district'] ); ?>		
                                 <select id="filter_product_slb_street"  class="tbSelectInput filter_product_slb_street filter_product_input" name="slb_street">
                                    <option value="-1">Đường</option>
                                    <?php foreach($list_street as $street): ?>
									<option value="<?php print $street->id;?>" <?php if($s['slb_street'] == $street->id) print 'selected="selected"';?> ><?php print $street->name;?></option>
									<?php endforeach; ?>     
                                </select>
                            </div>
                            <div class="col_filter_product">
								<?php  $list_project = mdGetListProjectByDistrict( $s['slb_district'] ); ?>		
                                <select id="filter_product_slb_project" class="tbSelectInput filter_product_slb_project filter_product_input" name="slb_project">
                                    <option value="-1">Dự án</option>
                                    <?php foreach($list_project as $project): ?>
									<option value="<?php print $project->id;?>" <?php if($s['slb_project'] == $project->id) print 'selected="selected"';?> ><?php print $project->name;?></option>
									<?php endforeach; ?>  
                                </select>
                            </div>   
                            <div class="col_filter_product last">          
								<?php  $list_direct = mdGetListDirectionReal( ); ?>		                                                 
                                <select id="filter_product_slb_direction" class="tbSelectInput filter_product_slb_direction filter_product_input" name="slb_direction">
                                    <option value="-1">Chọn hướng nhà</option>
                                    <?php foreach($list_direct as $direct): ?>
									<option value="<?php print $direct['id'];?>" <?php if($s['slb_direction'] == $direct['id']) print 'selected="selected"';?> ><?php print $direct['name'];?></option>
									<?php endforeach; ?>                                     
                                </select>
                            </div>   
                            <div class="clf"></div>
                        </div>
                        <div class="group_filer_product">   
                           <div class="col_filter_product">							   
							   <?php  $list_number = arraySearchNumber( ); ?>		
                                <select id="filter_product_slb_floor" class="tbSelectInput filter_product_slb_floor filter_product_input" name="slb_floor">
                                    <option value="-1">Số lầu</option>
                                    <?php foreach($list_number as $number): ?>
									<option value="<?php print $number['value'];?>" <?php if($s['slb_floor'] == $number['value']) print 'selected="selected"';?> ><?php print $number['name'];?></option>
									<?php endforeach; ?>       
                                </select>
                           </div>   
                           <div class="col_filter_product">
                                <select id="filter_product_slb_room" class="tbSelectInput filter_product_slb_room filter_product_input" name="slb_room">
                                    <option value="-1">Số phòng</option>
									<?php foreach($list_number as $number): ?>
									<option value="<?php print $number['value'];?>" <?php if($s['slb_room'] == $number['value']) print 'selected="selected"';?> ><?php print $number['name'];?></option>
									<?php endforeach; ?>       
                                </select>
                            </div>
                            <div class="col_filter_product">
                                 <select id="filter_product_slb_toilet"  class="tbSelectInput filter_product_slb_toilet filter_product_input" name="slb_toilet">
                                    <option value="-1">Số toilet</option>                                   
                                    <?php foreach($list_number as $number): ?>
									<option value="<?php print $number['value'];?>" <?php if($s['slb_toilet'] == $number['value']) print 'selected="selected"';?> ><?php print $number['name'];?></option>
									<?php endforeach; ?>       
                                </select>
                            </div>
                            <div class="col_filter_product">
                                <?php $list_legal = mdGetListLegalReal(); ?>
                                <select id="filter_product_slb_legal" class="tbSelectInput filter_product_slb_legal filter_product_input" name="slb_legal">
                                    <option value="-1">Chọn pháp lý</option>
                                    <?php foreach($list_legal as $legal): ?>
										<option value="<?php print $legal['id'];?>" <?php if($s['slb_legal'] == $legal['id']) print 'selected="selected"';?> ><?php print $legal['name'];?></option>
									<?php endforeach; ?>
                                </select>
                            </div>   
                            <div class="col_filter_product last">
                                <select id="filter_product_slb_front" class="tbSelectInput filter_product_slb_front filter_product_input" name="slb_front">
                                    <option value="-1">Mặt tiền</option>
                                    <option value="0">Không xác định</option>
                                   <?php foreach($list_number as $number): ?>
									<option value="<?php print $number['value'];?>" <?php if($s['slb_front'] == $number['value']) print 'selected="selected"';?> ><?php print $number['name'] . ' m';?></option>
									<?php endforeach; ?>       
                                </select>
                            </div>   
                            <div class="clf"></div>
                        </div>  
                    </div>
                </div>
                <div class="col_right right">
                    <div class="">
                        <input type="submit" class="btn_filter_product_realestate tbnd_btn_submit" name="" value="Tìm kiếm" id="btn_filter_product_realestate" style="width:80px;">
                    </div>
                    <div class="mar_t_5">
                        <a href="javascript:;" class="toggle_filter_extention_product">Tìm nâng cao</a>                       
                    </div>                   
                </div>
                <div class="clf"></div>
            </form>
        </div>
    </div>
</div>
